<include file="public:header" />
<div class="subnav">
	<div class="content_menu ib_a blue line_x">
    		注意：本采集器需要对接爱淘客联盟，未购买授权请联系我们 <a href="http://bbs.itaoke.org/" target="_blank">http://bbs.itaoke.org/</a>
	</div>
</div>
<div class="subnav">
	<h1 class="title_2 line_x">爱淘宝联盟精选库采集器(请预先在产品库进行选品,然后再采集) 教程：http://www.aitaoker.com/article/9.html</h1>
</div>
<div class="pad_lr_10">
    <form id="J_info_form" action="{:U('Xuan/setting')}" method="post">
    <table width="100%" cellspacing="0" class="table_form">
	
    <tr>
		<th></th>
		<td><input type="submit" value="开始采集" name="dosubmit" class="smt mr10"></td>
	</tr>
    </table>
    <input type="hidden" name="cate_id" id="J_cate_id" value="0" />	
    </form>	
</div>
<include file="public:footer" />
<script>
$(function(){
    var collect_url = "{:U('Xuan/collect')}";
    $('#J_info_form').ajaxForm({success:complete, dataType:'json'});
    var p = 2;
    function complete(result){
        if(result.status == 1){
            $.dialog({id:'xuan', title:result.msg, content:result.data, padding:'', lock:true});
            p = 2;
            collect_page();
        } else {
            $.itaoke.tip({content:result.msg, icon:'alert'});
        }
    }
    function collect_page(){
        $.getJSON(collect_url, {p:p}, function(result){
            if(result.status == 1){
                $.dialog.get('xuan').content(result.data);
                p++;
                collect_page(p);
            }else{
                $.dialog.get('xuan').close();
                $.itaoke.tip({content:result.msg});
            }
        });
    }

});
</script>
</body>
</html>